import {fromJS} from "immutable";
import {save_tips_list_data, save_type_tips_data} from "./constants";


const defaultState = fromJS({
    typeTipsList: [],
    choiceIndex: 0,
    tipsListData:[],

});


export default (state = defaultState, action) => {
    switch (action.type) {
        case save_type_tips_data:
            return state.set("typeTipsList", fromJS(action.data));

        case save_tips_list_data:

            return state.set("tipsListData",fromJS(action.data));

        default:
            return state;
    }
}